﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;

using Katana.BusinessLogic;
using Katana.DataAccess;

namespace Katana
{
    public partial class Teams : System.Web.UI.Page
    {
        private Team m_Team = null;

        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                m_Team = TeamController.GetTeam(new Guid("a1f3a52e-6389-40fd-ae23-adbaf0d66c4a"));

                UpdateContent();
            }
        }

        private void UpdateContent()
        {
            this.TeamLabel.Text = m_Team.Naam;
            this.TeamKlasse.Text = m_Team.Klasse;

            foreach (Lid lid in m_Team.Leden)
            {
                this.TeamSpelers.Items.Add(new ListItem(lid.Voornaam + lid.Achternaam));
            }
        }
    }
}
